package com.luping.xiao.xiao.controller;

import com.luping.xiao.xiao.domain.OpException;
import com.luping.xiao.xiao.domain.TRPassengerFlow;
import com.luping.xiao.xiao.service.OpExceptionService;
import com.luping.xiao.xiao.utils.controller.BaseController;
import com.luping.xiao.xiao.utils.demoin.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class OpExceptionController extends BaseController {

    @Autowired
    private OpExceptionService opExceptionService;

    @RequestMapping("opexcep")
    @ResponseBody
    public AjaxResult opexcep(String d, String t) throws Exception {
        OpException op = new OpException();
        try {
            op.setDateS(d + " 00:00:00");
            op.setDateE(d + " 23:59:59");
            op.setOct(t);
            op.setSert(t);
            opExceptionService.queryList(op);
        } catch (Exception e) {
            e.printStackTrace();
            return error();
        }
        return success();
    }
}
